package HomeWork.work7;

import java.util.Scanner;

/**
 * @author banana
 */
public class Work7 {
    public static void main(String[] args) {
        int x =1+ (int) (Math.random() * 10);
        System.out.println("请输入一个1-10之间的数");
        Scanner sc = new Scanner(System.in);
        int a = sc.nextInt();
        while(a!=x){
            if (a < x) {
                System.out.println("猜小了");
            } else {
                System.out.println("猜大了");

            }
            System.out.println("请继续猜把：");
            a=sc.nextInt();
        }System.out.println("恭喜你，猜对了！");
    }
}